<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Attribute List</title>
<link rel="stylesheet" href="style.css" type="text/css">
<script type="text/javascript" src="common.js"></script>
</head>
<body>
	<h1>Attribute List</h1>
	<form:form id="attributeListForm" action="attribute-list">
		<input type="hidden" name="parentClassId" value="<%= request.getParameter("parentClassId") %>"/>
		<table>
			<tr>
				<th width="10%">Selection</th>
				<th>Attribute Name</th>
			</tr>
			<c:forEach items="${attributeList}" var="attribute">
			<tr>
				<td><input type="radio" name="selectedAttributeId" value="${attribute.id}"/></td>
				<td><c:out value="${attribute.attributeName}"/></td>
			</tr>
			</c:forEach>
		</table>
		<input type="button" value="New" onclick="submitForm('showFormNew')"/>
		<input type="button" value="Edit" onclick="submitForm('showFormEdit')"/>
		<input type="button" value="Delete" onclick="submitForm('delete')"/>
	</form:form>
	Goto: <a href="class-list.html?method=list&parentComponentId=<c:out value="${parentComponentId}"/>">Class List</a>
</body>
</html>